package com.example.mobiledatapackage.domain;

import lombok.Getter;
import lombok.Setter;
import org.apache.jena.rdf.model.Property;
import org.apache.jena.rdf.model.RDFNode;

import java.util.Objects;

/**
 * 需要对用户的套餐进行改进的套餐方面
 */
@Getter
@Setter
public class WeakSpot {
    Property property; // 指示 needMore 等
    RDFNode spot;

    public WeakSpot(Property p, RDFNode spot) {
        this.property = p;
        this.spot = spot;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof WeakSpot)) return false;
        WeakSpot weakSpot = (WeakSpot) o;
        return Objects.equals(property, weakSpot.property) && spot.equals(((WeakSpot) o).getSpot());
    }

    @Override
    public int hashCode() {
        return Objects.hash(property, spot);
    }
}
